package com.netcracker.automic.home.ejb;

import javax.annotation.PostConstruct;
import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import org.apache.log4j.Logger;

/**
 *
 * @author Versanov Kirill
 */
@Singleton
@Startup
public class AutomicTimer implements TimerLocal {

    @PostConstruct
    @Override
    @Schedule(minute = "*/1", hour = "*")
    public void initialize() {
        log.info("Timer is started!");
        log.info(plus());
    }

    public int plus() {
        return 2 + 2;
    }
    private static final Logger log = Logger.getLogger(AutomicTimer.class);
}
